home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
trueSpace 7.6
/
tS761B8Std.exe
/
{app}
/
Scripts
/
D3D
/
RsD3DMaterialFromME2_HLSLInstricts.fx
< prev
next >
Wrap
Text File
|
2008-06-10
|
3KB
|
128 lines
//----------------------------------------------------------------------
//This is the HLSL intrinsic function translation
//
//Author - Michal Valient
//Copyright (C) 2004 Caligari corporation
//
//----------------------------------------------------------------------
#ifndef RSD3DMATERIALFROMME_HLSLINSTRICTS_FX_DEFINED
#define RSD3DMATERIALFROMME_HLSLINSTRICTS_FX_DEFINED
#define rtx_Abs abs
#define rtx_Acos acos
#define rtx_All all
#define rtx_Any any
#define rtx_Asin asin
#define rtx_Atan atan
#define rtx_Atan2 atan2
#define rtx_Ceil ceil
#define rtx_Clamp clamp
#define rtx_Clip clip
#define rtx_Cos cos
#define rtx_CosH cosh
#define rtx_Cross cross
#define rtx_Ddx ddx
#define rtx_Ddy ddy
#define rtx_Degrees degrees
#define rtx_Determinant determinant
#define rtx_Distance distance
#define rtx_Dot dot
#define rtx_Exp exp
#define rtx_Exp2 exp2
#define rtx_Faceforward faceforward
#define rtx_Floor floor
#define rtx_Fmod fmod
#define rtx_Frac frac
#define rtx_Frexp frexp
#define rtx_Fwidth fwidth
#define rtx_IsFinite isfinite
#define rtx_IsInfinite isinf
#define rtx_IsNAN isnan
#define rtx_Ldexp ldexp
#define rtx_Length length
#define rtx_Lerp lerp
#define rtx_Lit lit
#define rtx_Log log
#define rtx_Log10 log10
#define rtx_Log2 log2
#define rtx_Max max
#define rtx_Min min
#define rtx_Modf modf
#define rtx_Mul mul
#define rtx_Noise noise
#define rtx_Normalize normalize
#define rtx_Pow pow
#define rtx_Radians radians
#define rtx_Reflect reflect
#define rtx_Refract refract
#define rtx_Round round
#define rtx_Rsqrt rsqrt
#define rtx_Saturate saturate
#define rtx_Sign sign
#define rtx_Sin sin
#define rtx_SinCos sincos
#define rtx_SinH sinh
#define rtx_Smoothstep smoothstep
#define rtx_Sqrt sqrt
#define rtx_Step step
#define rtx_Tan tan
#define rtx_Tanh tanh
#define rtx_Tex1D tex1D
#define rtx_Tex1DProj tex1Dproj
#define rtx_Tex1DBias tex1Dbias
#define rtx_Tex2D tex2D
#define rtx_Tex2DProj tex2Dproj
#define rtx_Tex2DBias tex2Dbias
#define rtx_Tex3D tex3D
#define rtx_Tex3DProj tex3Dproj
#define rtx_Tex3DBias tex3Dbias
#define rtx_TexCUBE texCUBE
#define rtx_TexCUBEProj texCUBEproj
#define rtx_TexCUBEBias texCUBEbias
#define rtx_Transpose transpose
//The special ones - operator mappings:
#define rtx_Modulate(A,B) ((A)*(B))
#define rtx_Add(A,B) ((A)+(B))
#define rtx_Sub(A,B) ((A)-(B))
#define rtx_Divide(A,B) ((A)/(B))
#define rtx_Modulus(A,B) ((A)%(B))
#define rtx_Negate(A) (-(A))
#define rtx_Not(A) (!(A))
textureCUBE tex_CubeMapNormalization;
samplerCUBE smpl_CubeMapNormalization = sampler_state {
Texture = <tex_CubeMapNormalization>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
};
#ifndef RSD3D_FALLBACKMODE
#define RSD3D_CUBEMAPNORMALIZE
#endif
#ifdef RSD3D_PROFILE_PS_2_A
#undef RSD3D_CUBEMAPNORMALIZE
#endif
#ifdef RSD3D_PROFILE_PS_2_B
#undef RSD3D_CUBEMAPNORMALIZE
#endif
#ifdef RSD3D_PROFILE_PS_3_0
#undef RSD3D_CUBEMAPNORMALIZE
#endif
//CubeMapLookup Normalization core
#ifdef RSD3D_CUBEMAPNORMALIZE
#define rtx_CubeNormalize(A) (2.0f*texCUBE(smpl_CubeMapNormalization, A).xyz - 1.0f)
#else
#define rtx_CubeNormalize(A) normalize(A)
#endif
#endif //RSD3DMATERIALFROMME_HLSLINSTRICTS_FX_DEFINED